package com.grupobbva.seguridad.client.web.taglib;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import com.grupobbva.seguridad.client.util.Seguridad;

public class ControlTag extends TagSupport {
	
	private static final long serialVersionUID = 2909093764681070031L;

	private String type;
	private String var;
	
	public int doStartTag() throws JspException {
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        request.setAttribute(var, new Seguridad(request));
        return super.doStartTag();
    }
    
    public int doEndTag() throws JspException {        
        return super.doEndTag();
    }

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getVar() {
		return var;
	}

	public void setVar(String var) {
		this.var = var;
	}
}
